/**
 * ------------------------------------------------------------------
 *Copyright reserved by Emin Technology
 *------------------------------------------------------------------

 *PROJECT:		eminview-sales
 *FILE:			PagedResult.java
 *AUTHOR:		Senon Ye
 *DATE CREATION:2011-02-15
 *DESCRIPTION:	Page

 *==========================================================
 * VERSION CONTROL
 *Number – Date – Author – SVN – Description
 *01 –  2011-02-15 – senon ye – xxx – PagedResult
 *-------------------------------------------------------------------------------------------------------
 */

package top.jle.jpa.basic.dao;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;


/**
 * 封装分页查询结果
 * 
 * @author Senon Ye
 *
 * @param <T>
 */
public class PagedResult<T extends Serializable> implements Serializable {

	/**
	 * 
	 */
	@Serial
	private static final long serialVersionUID = -991511263433701785L;

	/**
	 * 当前结果集
	 */
	private List<T> resultList;

	/**
	 * 总行数
	 */
	private Integer totalCount;	
	
	/**
	 * 下次查询需要跳过的行数
	 */
	private final Integer nextOffset;
	
	/**
	 * 当前页码
	 */
	private Integer currentPage;
	
	/**
	 * 总页数
	 */
	private Integer totalPageNum;
	
	/**
	 * 每页条数
	 */
	private Integer pageSize;

	public PagedResult(List<T> resultList,Integer nextOffset, Integer totalCount,Integer currentPage) {
		this.resultList= resultList;
		this.nextOffset=nextOffset;
		this.totalCount=totalCount;
		this.currentPage = currentPage;
	}

	/**
	 * 当前结果集
	 * @return the resultList
	 */
	public List<T> getResultList() {
		return this.resultList;
	}

	/**
	 * 总行数
	 * @return the totalCount
	 */
	public Integer getTotalCount() {
		return this.totalCount;
	}

	public void setTotalCount(Integer totalCount){
		
		this.totalCount = totalCount;
	}

	public Integer getNextOffset() {
		return this.nextOffset;
	}

	public void setResultList(List<T> resultList) {
		this.resultList = resultList;
	}

	public Integer getTotalPageNum() {
		return totalPageNum;
	}

	public void setTotalPageNum(Integer totalPageNum) {
		this.totalPageNum = totalPageNum;
	}

	public Integer getCurrentPage() {
		return currentPage;
	}

	public void setCurrentPage(Integer currentPage) {
		this.currentPage = currentPage;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}
	
	
	
}
